<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
*/

/**
 * Description of OgWebLayout
 *
 * @author Martin
 */
class OgWebLayout extends OgHtmlJQueryUIDocument {


  protected $title;

  protected $leftBox;
  protected $headBox;
  protected $rightBox;

  protected $unfluid;


  public function  __construct() {
    parent::__construct();
    $this->initComponents();
  }

  /**
   * Method set html tag title for this page
   * @param String $title_string
   */
  public function setTitle($title_string) {
    $this->title->setInnerHtml($title_string);
  }

  public function getHeadBox() {
    return $this->headBox;
  }

  public function getRightBox() {
    return $this->rightBox;
  }

  public function getLeftBox() {
    return $this->leftBox;
  }

  protected function initComponents() {
    /* start of definition HTML header components */
    $this->title = new OgElement('title', $this->title);
    parent::getHeader()->addComponent($this->title);

    parent::getHeader()->addComponent(new OgCssLink('css/main.css'));

    /* start of difinition html body */
    $this->headBox = new OgElement('div');
    $this->headBox->addAttribute('id', 'header');

    $this->leftBox = new OgElement('div');
    $this->leftBox->addAttribute('id', 'left');

    $this->rightBox = new OgElement('div', 'right');
    $this->rightBox->addAttribute('id', 'right');


    $this->footerBox = new OgElement('div', 'footer');
    $this->footerBox->addAttribute('id', 'footer');


    $this->unfluid = new OgElement('div');
    $this->unfluid->addAttribute('id', 'unfluid');
    parent::getBody()->addComponent($this->unfluid);

    $this->unfluid->addComponent($this->headBox);
    $this->unfluid->addComponent($this->leftBox);
    $this->unfluid->addComponent($this->rightBox);
    $this->unfluid->addComponent($this->footerBox);

  }
}
?>
